package com.mogujie.tt.ui.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.mogujie.tt.R;
import com.mogujie.tt.ui.activity.RichScanActivity;
import com.mogujie.tt.ui.base.TTBaseFragment;

import static com.mogujie.tt.ui.activity.RichScanActivity.*;

/**
 * Created by Administrator on 2015/10/29.
 */
public class RichScanHintFragment extends TTBaseFragment {

    private View curView = null;
    private TextView tv;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup vg, Bundle bundle) {


        if (null != curView) {
            ((ViewGroup) curView.getParent()).removeView(curView);
            return curView;
        }
        curView = inflater.inflate(R.layout.tt_fragment_richscanhint, topContentView);
        initRes();
        return curView;
    }

    private void initRes() {
        // 设置标题栏
        setTopLeftButton(R.drawable.tt_top_back);
        topLeftContainerLayout.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View arg0) {
                getActivity().finish();
            }
        });
        setTopLeftText(getResources().getString(R.string.top_left_back));

        initView();
    }

    private void initView() {
        tv = (TextView) curView.findViewById(R.id.textView);

        tv.setText(RichScanActivity.string+"");
    }

    @Override
    protected void initHandler() {

    }
}
